﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS.Helpers.PLCOperation;

namespace WCS.Entity
{
    [SugarTable("WCS_Dev_Station")]
    public class WcsDevStation
    {
        /// <summary>
        /// true
        /// </summary>
        public int ATTRIBUTE3 { get; set; }

        /// <summary>
        /// false
        /// </summary>
        public int ATTRIBUTE4 { get; set; }

        public string ATTRIBUTE5 { get; set; }

        /// <summary>
        /// Plc站台号
        /// </summary>
        public string Station_Plc_No { get; set; }

        /// <summary>
        /// Plc设备号
        /// </summary>
        public string DevCode { get; set; }

        /// <summary>
        /// 站台名称
        /// </summary>
        public string Station_Name { get; set; }

        /// <summary>
        /// 站台读取偏移量
        /// </summary>
        public int Station_Read_Offset { get; set; }

        /// <summary>
        /// 站台写入偏移量
        /// </summary>
        public int Station_Write_Offset { get; set; }

        /// <summary>
        /// 站台说明
        /// </summary>
        public string Station_Explain { get; set; }

        /// <summary>
        /// 读取地址
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string ReadAddress { get; set; }

        /// <summary>
        /// 写入地址
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string WriteAddress { get; set; }

        /// <summary>
        /// 记录上一次执行的任务类型
        /// </summary>
        public string LastTaskType { get; set; }

        /// <summary>
        /// 增加当前入库数量
        /// </summary>
        public int CurrentInCount { get; set; }

        /// <summary>
        /// 增加当前出库数量
        /// </summary>
        public int CurrentOutCount { get; set; }

        /// <summary>
        /// 生产物料数量
        /// </summary>
        public int MaterialNum { get; set; }

        /// <summary>
        /// 生产物料类型
        /// </summary>
        public string ProductionMaterials { get; set; }

        public S7Plc S7Plc = null;

        /// <summary>
        /// OPCUA采集项读取地址
        /// </summary>
        public Dictionary<string, string> ReadkeyValuePairs = new Dictionary<string, string>();

        /// <summary>
        /// OPCUA采集项写入地址
        /// </summary>
        public Dictionary<string, string> WritekeyValuePairs = new Dictionary<string, string>();
    }
}
